package com.xu.service.impl;

import com.xu.domain.User;
import com.xu.repository.UserRepository;
import com.xu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: xu
 * @Date: 2021/3/22 14:13
 * @Version 1.0
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserRepository userRepository;
    @Override
    public User validate(User user) {
        return null;
    }

    @Override
    public void register(User user) {
        userRepository.save(user);
    }

    @Override
    public List<User> findUsers() {
        return userRepository.findAll();
    }
}
